package cn.humaohua.study.yanmo_design_pattern.ch13.v4;

public class DuckCommand implements Command {
    private CookApi cook;

    private int tableNum;

    public DuckCommand(int tableNum) {
        this.tableNum = tableNum;
    }

    @Override
    public int getTableNum() {
        return tableNum;
    }

    public void setCook(CookApi cook) {
        this.cook = cook;
    }

    @Override
    public void execute() {
        this.cook.cook(tableNum, "duck");
    }

}
